<script>
export default {
  methods: {
    logout() {
      window.sessionStorage.clear();
      this.$router.push('/login');
      this.$message.info("已退出登录")
    }
  }
};
</script>

<template>
  <el-button type="info" @click="logout">退出</el-button>
</template>

<style lang="less" scoped>

</style>